Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: LS2J security exception
~Tanita Quetfreegenli 1.Sep.03 05:01 PM a Web browser
Domino Server 6.0.2 CF1 Windows 2000


I have tried your code on my local Notes client and it has worked correctly. I am sorry but i can not test it on a Domino Server because our Server is still on R5 :-(.

But i have one hint for you. In your code you acess the System properties with System.getProperties. In my opinion this asks the securityManager, is it allowed to write to all propertys. Maybe it ist better to set the properties with System.setProperty(key,value). Your code should then look like this:

import java.net.*;
import java.io.*;

public class URLReader {
public boolean on = false;

public void download(String url, String filename) throws Exception
{
try{
System.setProperty("proxySet", "true" );
System.setProperty("proxyHost", "proxy1" );
System.setProperty("proxyPort", "8080" );
URL urlname = new URL(url);
File outputFile = new File(filename);
FileOutputStream out = new FileOutputStream(outputFile);
BufferedInputStream in = new BufferedInputStream(urlname.openStream());
int input;
while ((input = in.read()) != -1)
{
out.write(input);
}
in.close();
out.close();
}
catch(java.lang.SecurityException e){
e.printStackTrace();
}
}
}

I hope this helps

Greetings

Ralf M Petter

P. S. Es gibt auch ein sehr gutes Lotus Notes Java Forum in Deutsch. www.atnotes.de. Schau einfach mal rein.




LS2J security exception (~Tony Quetjipyl... 1.Sep.03)
. . RE: LS2J security exception (~Tanita Quetfre... 1.Sep.03)
. . RE: LS2J security exception (~Tanita Quetfre... 1.Sep.03)
. . . . RE: LS2J security exception (~Tony Quetjipyl... 1.Sep.03)
. . . . . . RE: LS2J security exception (~Tanita Quetfre... 1.Sep.03)
. . . . . . . . RE: LS2J security exception (~Tony Quetjipyl... 1.Sep.03)
. . . . . . . . . . RE: LS2J security exception (~Tanita Quetfre... 1.Sep.03)
. . . . . . . . . . . . I got it! (~Tony Quetjipyl... 2.Sep.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS